home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18src / makedict.sh (.txt) < prev    next >
Microsoft Windows Help File Content  |  1994-01-25  |  3KB  |  60 lines

  1. : Use /bin/sh
  2. # $Id: makedict.sh,v 1.9 1994/01/25 07:11:53 geoff Exp $
  3. # Copyright 1987, 1988, 1989, 1992, 1993, Geoff Kuenning, Granada Hills, CA
  4. # All rights reserved.
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions
  7. # are met:
  8. # 1. Redistributions of source code must retain the above copyright
  9. #    notice, this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright
  11. #    notice, this list of conditions and the following disclaimer in the
  12. #    documentation and/or other materials provided with the distribution.
  13. # 3. All modifications to the source code must be clearly marked as
  14. #    such.  Binary redistributions based on modified source code
  15. #    must be clearly marked as modified versions in the documentation
  16. #    and/or other materials provided with the distribution.
  17. # 4. All advertising materials mentioning features or use of this software
  18. #    must display the following acknowledgment:
  19. #      This product includes software developed by Geoff Kuenning and
  20. #      other unpaid contributors.
  21. # 5. The name of Geoff Kuenning may not be used to endorse or promote
  22. #    products derived from this software without specific prior
  23. #    written permission.
  24. # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  25. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. # ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  28. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  30. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  31. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  32. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  33. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  34. # SUCH DAMAGE.
  35. #    Make a beginning dictionary file for ispell, using an existing
  36. #    speller.
  37. #    Usage:
  38. #    makedict file-list
  39. #    The specified files are collected, split into words, and run through
  40. #    the system speller (usually spell(1)).  Any words that the speller
  41. #    accepts will be written to the standard output for use in making
  42. #    an ispell dictionary.  Usually, you will want to run the output
  43. #    of this script through "munchlist" to get a final dictionary.
  44. # $Log: makedict.sh,v $
  45. # Revision 1.9  1994/01/25  07:11:53  geoff
  46. # Get rid of all old RCS log lines in preparation for the 3.1 release.
  47. # This program must produce a list of INCORRECTLY spelled words on standard
  48. # output, given a list of words on standard input.  If you don't have a
  49. # speller, but do have a lot of correctly-spelled files, try /bin/true.
  50. SPELLPROG="${SPELLPROG-spell}"
  51. TMP=${TMPDIR-/tmp}/mkdict$$
  52. case "$#" in
  53.     0)
  54.     set X -
  55.     shift
  56. trap "/bin/rm ${TMP}; exit 1" 1 2 15
  57. cat "$@" | deroff | tr -cs "[A-Z][a-z]'" '[\012*]' | sort -uf -o ${TMP}
  58. $SPELLPROG < ${TMP} | comm -13 - ${TMP}
  59. /bin/rm ${TMP}
  60.